package com.dgw.mybatisgenerator.controller;

import com.dgw.mybatisgenerator.dao.UserMapper;
import com.dgw.mybatisgenerator.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: Boot-mybatisgenerator
 * @description:
 * @author: Mr.Dai
 * @create: 2020-02-08 21:46
 **/
@RestController
public class UserController {

    @Autowired
    private UserMapper userMapper;

    //http://localhost:8080/findAll
    @GetMapping("/findAll")
    public List<User> findAll(){
        return userMapper.selectAll();
    }

}
